package com.guchenbo.scala

/**
 * @author guchenbo
 * @date 2022/3/17
 */
object ApplyDemo {
  def main(args: Array[String]): Unit = {
    println(Stu())
    val stu = new Stu()
    println(stu("1"))
  }
}

class Stu {
  def apply(str: String): Unit = {
    println(str)
  }

}

object Stu {
  def apply(): Stu = new Stu
}
